package com.lancoo.cvas.mapper;

import com.lancoo.cvas.config.MybatisRedisCache;
import com.lancoo.cvas.entity.Teacher;
import com.lancoo.cvas.entity.TeachingClassTeacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.cvas.pojo.vo.TeachingClassCourseDto;
import org.apache.ibatis.annotations.CacheNamespace;

import java.util.List;

/**
 * 教学班-教师
 * 
 * @author liufeng
 * @email 1037383243@qq.com
 * @date 2023-12-04 11:54:00
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface TeachingClassTeacherMapper extends BaseMapper<TeachingClassTeacher> {

    /**
     * 根据教学班id获取其教师名称
     * @param teachingClassIds
     * @return
     */
    List<Teacher> getTeacherByTeachingClassIds(List<Long> teachingClassIds);

    /**
     * 批量保存教学班对应教师
     * @param teachingClassTeacherList
     */
    void saveBatch(List<TeachingClassTeacher> teachingClassTeacherList);

    List<Long> getTeacherHasScheduleByTaskId(Integer taskId, int deleted);

    List<Long> getTeacherHasClassByTaskId(Integer taskId, List<TeachingClassCourseDto> teachingClassList, int deleted);

    List<Long> getTeachingClassByTeacherId(Integer taskId, List<Long> teachers, int deleted);
}
